Optical networks utilize various underlying protocols for transmission including for example, SONET, SDH, OTN, and the like. These protocols provide among other things operations, administration, maintenance, and provisioning (OAM&P) functions. That is, each of these protocols include a plurality of alarms for notifying network operators of various conditions in the optical networks. Conventionally, optical networks raises alarms when a failure or condition is detected and clears the alarm when the failure or condition goes away or is removed. A problem exists where a line in an optical network goes in and out of failure or some other condition within a period of time. Specifically, conventional optical networks do not recognize such alarms. This situation is referred to as line flapping which is where a line or the like experiences failures or conditions that are coming and going within a period of time. For example, exemplary failures such as Loss of Frame (LOF), Loss of Signal (LOS), etc. generate alarms when they occur. However, if these conditions are intermittent within a specific period of time, they may not be reported. Defects on a line are always recognized and result in the framer generating LOS, LOF, etc. However, a line down alarm may not be generated if the defect is only present for a short time period, e.g. less than 2.5 seconds. Line flapping is generally involved in the situation where a line goes down for less than 2.5 seconds, e.g. for 0.5 second or 1 second, and then goes back up and then down again for a second, etc. The framer generates LOS, LOF, etc. and traffic may be restored (e.g., meshed off the line), but no alarm is reported. Once the failure goes away and the line is up, traffic gets back on the line and then when it goes back down again it may be restored off. One exemplary reason for line flapping may include degradation of system components, e.g. optical modules. Thus, there exists a need for line flapping detection to provide network operators notification that the line is flapping such that proactive maintenance may be performed, e.g. the optical module is beginning to degrade and may need replacing.